package cn.com.connext.scrm.repository.master;

import cn.com.connext.scrm.domain.master.SendRecordEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * 验证码短信发送记录数据操作接口
 */
public interface SendRecordRepository extends JpaRepository<SendRecordEntity, String> {
    @Query(value = "select count(1) from send_record where receive_phone =?1 and send_time>?2 and result='0'", nativeQuery = true)
    Integer getCountTodayByMobile(String receivePhone, String today);
}
